/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.post(`${SERVER.WHOLESALES}/ttFiBillingAudit/list`, params)
// 查询详情
export const getDetail = (params) => axios.get(`${SERVER.WHOLESALES}/ttFiBillingAudit/selectOneById`, { params })
// 订货单审核
export const auditOne = (params) => axios.post(`${SERVER.WHOLESALES}/ttFiBillingAudit/auditOne`, params)
// 获取折扣详情
export const updateStatusByIds = (params) => axios.get(`${SERVER.WHOLESALES}/ttFiBillingAudit/updateStatusByIds`, { params })
//  导出
export const exportList = (params) => axios.post(`${SERVER.WHOLESALES}/ttFiBillingAudit/excel`, params, { responseType: 'blob' })
// 保存订货单
export const saveOrder = (params) => axios.post(`${SERVER.WHOLESALES}/orderGoods/saveOrder`, params)
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// 获取订单细分类型
export const getNotPage = (params) => axios.get(`${SERVER.WHOLESALES}/fiOrderTypeSub/searchFiOrderTypeSubDTOListNotPage`, { params })
//获取经销商余额池
export const getAmount = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getAmount`, {params})
// 获取事业部
export const getDeptList = (params) => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType4cms`, { params })
// 获取办事处
export const getOfficeList = (params) => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType4cms`, { params })

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
